<?php
defined('IN_ADMIN') or exit('No permission resources.'); 
include $this->admin_tpl('header', 'admin');
?>

<div class="pad-lr-10">
<form name="myform" id="myform" action="" method="get" >
<input type="hidden" value="member" name="m">
<input type="hidden" value="review_admin" name="c">
<input type="hidden" value="del" name="a">
<input type="hidden" value="1" name="dosubmit">
<div class="table-list comment">
    <table width="100%">
        <thead>
            <tr>
			 <th width="16"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');"></th>
			<th width="130"><?php echo L('点评人')?></th>
			<th><?php echo L('内容')?></th>
			<th width="130"><?php echo L('点评商家');?></th>
			<th width="130"><?php echo L('来自订单');?></th>
			<th width="72"><?php echo L('operations_manage');?></th>
            </tr>
        </thead>
		<tbody class="add_comment">
    <?php
	if(is_array($data)) {
		foreach($data as $v) {
	?>
     <tr id="tbody_<?php echo $v['id']?>">
		<td align="center" width="16"><input class="inputcheckbox " name="ids[]" value="<?php echo $v['id'];?>" type="checkbox"></td> 
		<td width="130" align="center"><?php 
		$member_db = pc_base::load_model('member_model');
		//$member_db->set_model(10);
		$userdata = $member_db->get_one(array('userid'=>$v['user_id']));
		echo $userdata['username'];
		?></td>
		<td><font color="#888888"><?php echo L('于')?> <?php echo date('Y-m-d H:i:s',$v['time'])?> <?php echo L('发布')?></font><br /><?php echo $v['content']?></td>
		<td align="center"><?php 
		$member_db = pc_base::load_model('member_model');
		$member_db->set_model(13);
		$shopdata = $member_db->get_one(array('userid'=>$v['shop_id']));
		echo $shopdata['name'];
		?></td>
		<td align="center"><?php echo $v['order_id']?></td>
		<td align='center' width="72"><a href="?m=member&c=review_admin&a=del&ids=<?php echo $v['id']?>&dosubmit=1" onclick="return check(<?php echo $v['id']?>)"><?php echo L('delete');?></a> </td>
	</tr>
     <?php }
	}
	?>
	</tbody>
     </table>
    <div class="btn"><label for="check_box"><?php echo L('selected_all');?>/<?php echo L('cancel');?></label>
		<input type="hidden" value="<?php echo $_SESSION['pc_hash'];?>" name="pc_hash">
		<input type="submit" class="button" value="<?php echo L('delete');?>" />
	</div>
    <div id="pages"><?php echo $pages;?></div>
</div>
</form>
<script type="text/javascript">

function check(id) {
	if(confirm('<?php echo L('确认删除该点评?')?>')) {
			return true;
	}else{
		return false;
	}
}
</script>
</div>
</body>
</html>